package com.zh.socket.controller;


import com.zh.socket.mapper.BaseUserMapper;
import com.zh.socket.pojo.BaseUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SocketController {

    @Autowired
    private BaseUserMapper baseUserMapper;

    @GetMapping("/test")
    public String get(){
        return "hello";
    }

    @GetMapping("/add")
    public String add(){
        BaseUser baseUser = new BaseUser();
        baseUser.setName("zhangsans");
        baseUserMapper.insertSelective(baseUser);
        return "hello";
    }
}
